# Class definitions for drDobus
# 
###############################################################################

#' The "abstract" base class of all classes.
#' 
#' Object is needed to allow a  objects to refer to other objects of the same type. 
#' @author Bastian R. Angermann
#' @aliases Object-class
 setClass(Class="Object",representation=representation("referenceContainer"="environment"))

#' A single Rdata file passed to an action
#' 
#' Used for the CSV input format. This is only a workaround. Specifies a single rdata input file that should 
#' be read by execute and passed to an action.
#' @author Bastian R. Angermann
#' @aliases RDataFile RDataFile-class
setClass(Class="RDataFile",contains=c("list"))

#' A list of filenames passed to an action
#' 
#' Used for the CSV input format. This is only a workaround. Specifies a list of filenames
#' that should be passed to an action and read handled by the action itself.
#' @author Bastian R. Angermann
#' @aliases PassthroughFileList PassthroughFileList-class
setClass(Class="PassthroughFileList",contains=c("character"))




#' This class models the application of protocols to transform data (in the sense of FUGE).
#' 
#' An object of type ProtocolApplication must be run using the execute() generic function to be actually applied.
#' For details on how to create and execute pipelines see the vignette. ProtocolApplication extends 
#' class \code{Object}, directly.
#' Slots:
#' \describe{
#' \item{ parameterValues}{A named list of parameter Values. Names of list elements match parameter names.}
#' \item{ .inputData}{Data structure containing the location of input data. For internal use only.}
#' \item{ outputData}{A character string determining the location to which output data should be written. It's absence indicates data should be written to the global R environment, i.e. \code{.GlobalEnv}}
#' \item{.action}{The action that should be executed. For internal use only.}
#' \item{ .parent}{The parent ProtocolApplication object, or NULL if no parent ProtocolApplication object exists.}
#' \item{ .childProtocolApplications}{A list of child protocol applications. For internal use only.}
#' \item{ name}{The name of the protocol application. Matches the file name of the protocol definition, if the protocol application has no parent within the same file, which is always the case for CSV files. For internal use only.}
#' \item{workingDirectory}{The working directory}
#' \item{.dataLocationFile}{The file specifying the locations of input data}
#' \item{report}{The Report object specifying the reporting details}
#' \item{cluster}{A snow cluster object for parallelization}
#' }
#' @author Bastian R. Angermann
#' @aliases ProtocolApplication-class
#' @export
#' @references  The Functional Genomics Experiment model (FuGE) \url{http://fuge.sourceforge.net/}
setClass(Class="ProtocolApplication",
         representation=representation(parameterValues="list",
            .inputData="list",
            ignoreList="data.frame",
            outputData="character",
            .action="function",
            .parent="Object",
            .childProtocolApplications="list",
            name="character",
            workingDirectory="character",
            .dataLocationFile="ANY",
            report="Report",
            cluster="ANY"), 
         prototype=prototype(.parent=as.null(),.dataLocationFile=as.null(),cluster=as.null()),
         contains=c("Object") )

 

  
